<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:73:"C:\wamp\www\projectTwo\public/../application/index\view\index\detail.html";i:1539260014;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>问题详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="">
    <link rel="stylesheet" href="/static/index/layui/css/layui.css">
    <link rel="stylesheet" href="/static/index/css/global.css">
    <link rel="stylesheet" href="/static/index/css/detail.css">
    <script src="/static/index/layui/layui.js"></script>
    <script src="/static/admin/js/jquery-3.2.1.min.js"></script>
</head>

<body>
    <iframe  src="../head" scrolling="no" width="100%" height="65px" ></iframe>
    
    <div class="main layui-clear">
        <div class="wrap">
            <div class="content detail">
                <div class="fly-panel detail-box">

                    <h1><?php echo $problem['zz_problem_tit']; ?></h1>
                    <div class="fly-tip fly-detail-hint" data-id="">
                        <!--<span class="fly-tip-stick">置顶帖</span><span class="jie-admin"> <a-->
                        <!--href="">点击置顶</a> </span> <span-->
                        <!--class="layui-btn layui-btn-mini jie-admin"> <a href="">取消置顶</a>-->
                        <!--</span> -->

                        <?php if(!empty($user['user_status'])): ?>
                        <span class="jie-admin" type="del" id="a1">
                            <a class="updel" pid="<?php echo $problemId; ?>">删除该帖</a>
                        </span>
                        <?php else: ?>
                        <br>
                        <?php endif; ?>

                        <div class="fly-list-hint">
                            <i class="iconfont" title="回答">&#xe60c;</i> <?php echo $count; ?>
                        </div>
                    </div>

                    <div class="detail-about">
                        <a class="jie-user" href="">
                            <img src="/static/index/images/uer.jpg" alt="头像">
                            <cite> <?php echo $user['zz_name']; ?>
                                <em><?php echo $problem['zz_problem_time']; ?>发布</em>
                            </cite>
                        </a>

                        <div class="detail-hits" data-id="{{rows.id}}">
                            <span class="layui-btn layui-btn-mini jie-admin">
                                <a href="#">已完帖，无法编辑</a>
                            </span>
                            <?php if(empty($collect)): ?>
                            <span class="layui-btn layui-btn-mini jie-admin" type="collect" data-type="add">
                                <a id="collectPost" class="collect" pid="<?php echo $problemId; ?>" uid="<?php echo $userId['zz_id']; ?>">收藏</a>
                            </span>
                            <?php else: ?>
                            <span class="layui-btn layui-btn-mini jie-admin  layui-btn-danger " type="collect" data-type="add">
                                <a class="discollect" pid="<?php echo $problemId; ?>" uid="<?php echo $userId['zz_id']; ?>">取消收藏</a>
                            </span>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="detail-body photos" id="a2">
                        <p><?php echo $problem['zz_problem_content']; ?></p>
                    </div>
                </div>

                <div class="fly-panel detail-box" id="a3">
                    <a name="comment"></a>
                    <ul class="jieda photos" id="jieda">
                        <?php if($comment): if(is_array($comment) || $comment instanceof \think\Collection || $comment instanceof \think\Paginator): $i = 0; $__LIST__ = $comment;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                        <li data-id="12" class="jieda-daan">
                            <a name="item-121212121212"></a>

                            <div class="detail-about detail-about-reply">
                                <!--评论者名字-->
                                <a class="jie-user" href="">
                                    <img src="/static/index/images/uer.jpg" alt="">
                                    <cite><i><?php echo $v['zz_admin_name']; ?></i></cite>
                                </a>

                                <!--评论时间-->
                                <div class="detail-hits">
                                    <span><?php echo $v["zz_comment_time"]; ?></span>
                                </div>

                                <!--判断是否是采纳-->
                                <?php if($v['zz_comment_status'] == 1): ?>
                                <i class="iconfont icon-caina" title="最佳答案"></i>
                                <?php endif; ?>
                            </div>

                            <!--评论内容-->
                            <div class="detail-body jieda-body">
                                <p><?php echo $v['zz_comment_content']; ?></p>
                            </div>

                            <div class="jieda-reply">
                                <!--点赞个数-->
                                <!--<span class="jieda-zan zanok" type="zan">-->
                                    <!--<i class="iconfont icon-zan"></i>-->
                                    <!--<em>12</em>-->
                                <!--</span>-->

                                <?php if(!empty($user['user_status'])): ?>
                                <!--判断是否是当前问题的作者登录-->
                                <div class="jieda-admin">
                                    <!--判断是否被采纳-->
                                    <?php if($v['zz_comment_status'] == 1): ?>
                                    <span class="jieda-accept" type="accept">已采纳</span>
                                    <?php else: ?>
                                    <span type="del" class="del" data-id="<?php echo $v['zz_comment_id']; ?>">删除</span>
                                    <span class="jieda-accept com" type="accept" pid="<?php echo $problemId; ?>" data-id="<?php echo $v['zz_comment_id']; ?>">采纳</span>
                                    <?php endif; ?>
                                </div>
                                <?php endif; ?>
                                <br>
                            </div>
                        </li>
                        <?php endforeach; endif; else: echo "" ;endif; else: ?>
                        <li class="fly-none">没有任何回答</li>
                        <?php endif; ?>
                    </ul>

                    <!--回答模块-->
                    <span id="toName">@ <?php echo $user['zz_name']; ?>(楼主)</span>
                    <div class="layui-form layui-form-pane">

                        <form action="../doanswer/<?php echo $problem['zz_problem_id']; ?>" method="get" class="layui-form">
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <textarea id="L_content" name="zz_comment_content" lay-verify="required" placeholder="我要回答" class="layui-textarea fly-editor" id="a4"></textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <button class="layui-btn" lay-filter="*" lay-submit>
                                    提交回答
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

        <!--详情页 右边 热帖 和 热议-->
        <div class="edge">
            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">最近热帖</dt>
                <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <dd>
                    <a href="../details/<?php echo $v['zz_problem_id']; ?>"><?php echo $v['zz_problem_tit']; ?></a>
                    <span>
                        <i class="iconfont">&#xe60c;</i> <?php echo $v['num']; ?>
                    </span>
                </dd>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </dl>

            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">近期热议</dt>
                <?php if(is_array($res) || $res instanceof \think\Collection || $res instanceof \think\Paginator): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                <dd>
                    <a href="../details/<?php echo $v['zz_problem_id']; ?>"><?php echo $v['zz_problem_tit']; ?></a>

                    <span>
                        <i class="iconfont">&#xe60c;</i> <?php echo $v['num']; ?>
                    </span>
                </dd>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </dl>
        </div>
    </div>

    <script type="text/javascript" charset="utf-8" src="/static/index/js/kindeditor.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/index/js/detail.js"></script>
</body>
</html>